﻿<cfscript>
/** 
* DataBase Frameworks - Sequence
* 
* @hint "DataBase Frameworks - Sequence - MatrixGroupUser" 
*/ 

component
	displayname="public.service.db.senate.sequence.MatrixGroupUser" 
	output=false 
	accessors=true 
	{

	property type="string" name="UserId" hint="统一身份认证ID";
	property type="string" name="GroupId" hint="用户组系统ID";
	
	/**
	* @hint "初始化对象"
	*/
	public function init() output=false {
		return this;
	}
	
	/**
	* @hint "自定义主键规则"
	*/	
	public string function getID() output=false {
		
		var nextID = getUserId() & ":" & getGroupId();
		/* 		
			主键生成规则 
			
			用户代码 + : + 用户组

			Unique: UID, :, GID
		*/		
		return nextID;
	}

}

</cfscript>